package love_list

func ReverseList(head *SingleNode) *SingleNode {
	cur := head
	var pre *SingleNode
	for cur != nil {
		next := cur.Next

		cur.Next = pre

		pre = cur
		cur = next
	}
	return pre
}
